export default class SocketService {

    static instance = null
    ws = null

    static get Instance() {
        if (!this.instance) {
            this.instance = new SocketService()
        }
        return this.instance
    }

    connect() {
        if (!window.WebSocket) {
            return console.log('浏览器不支持websocket')
        }
        this.ws = new WebSocket('ws://localhost:9998')

    }
}